package com.asura.report;

import java.util.ArrayList;
import static com.asura.utils.StringUtil.NEWLINE;
import com.asura.course.CourseSession;

public class CourseReport {

	private ArrayList<CourseSession> sessions = new ArrayList<CourseSession>();

	public void add(CourseSession session) {
		sessions.add(session);
	}

	public String text() {
		StringBuilder sb = new StringBuilder();
		for (CourseSession session : sessions) {
			sb.append(session.getDepartment() + " " + session.getNumber() + NEWLINE);
		}
		return sb.toString();
	}
	
	public ArrayList<CourseSession> getSessions(){
		return sessions;
	}

}
